home *** CD-ROM | disk | FTP | other *** search
/ A.C.E. 2 / ACE CD 2.iso / FILES / UTILS / HSBASIC2.DMS / in.adf / HB2Examples2.0.Lha / Examples / HBMsg / NewMsg.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1994-05-10  |  695 b   |  34 lines

  1. /**
  2.  * $Id: NewMsg.rexx,v 1.1 1994/05/10 12:43:41 alex Rel $
  3.  *
  4.  * REXX script to connect HBMsg to TurboText
  5.  *
  6.  * (c) Copyright 1994 HiSoft
  7. **/
  8.  
  9. options RESULTS
  10.  
  11. parse arg '"' UNIT '"' '"' FILE '"' LINE POSITION NULL ZERO CLASS ERRNUM MESSAGE
  12.  
  13. fn = ParseFileName(FILE, 'FILE')
  14.  
  15. Address 'TURBOTEXT' 'GetPort' fn
  16. port = RESULT
  17. Address VALUE port
  18. 'Window2Front'
  19. 'ActivateWindow'
  20. 'Move' LINE
  21. 'SetStatusBar' MESSAGE
  22.  
  23. exit 0
  24.  
  25. /* Split filename from path */
  26. ParseFileName: procedure
  27.     parse arg FilePath, Part
  28.  
  29.     DivPos = max(lastpos(':', FilePath),lastpos('/', FilePath)) +1
  30.     if abbrev('FILE', upper(Part)) then
  31.         return substr(FilePath, DivPos)
  32.     else
  33.         return strip(left(FilePath, DivPos-1),'T', '/')
  34.